<template>
    <div class="app">
        <van-search
          shape="round"
          placeholder="请输入搜索关键词"
          v-model="searchValue"
          @search="onSearch"
        />
        <div>
            <van-button color="#7232dd" plain>单色按钮</van-button>
        </div>
        <div class="net-receive">
            <net-receive></net-receive>
        </div>
        <div class="table-bg">
            <net-table></net-table>
        </div>

        <net-bottom></net-bottom>

    </div>
</template>

<script>
import netTable from "./components/netTable.vue"
import netBottom from "./components/netBottom.vue"
import netLogin from "./netLogin.vue"
import { reqmenuadd } from "@/http/api.js"
export default {
    data(){
        return {
            searchValue:"",
        }
    },
    components:{
        netTable,
        netBottom,
        netLogin,
    },
    mounted() {
        if(!localStorage.getItem("token")){
            this.$router.push("/netLogin")
        }
        // localStorage.setItem("token","fanximei")
    },
    methods: {
        // 搜索
        async onSearch(){
            console.log("搜索",this.searchValue);
            let res = await reqmenuadd("1")
            console.log(res);
            

        },
    },
}
</script>

<style scoped lang="less">
.app{
    font-family: "微软雅黑";
}
.table-bg{
    width: 90%;
    margin: 0 auto;
}
</style>